﻿using Microsoft.AspNetCore.Mvc;

[ApiController]
[Route("api/qywx")]
public class QywxUpdateController : ControllerBase
{
    private readonly QywxService _qywxService;

    public QywxUpdateController(QywxService qywxService)
    {
        _qywxService = qywxService;
    }

    [HttpGet("update-data")]
    public async Task<IActionResult> UpdateWorkbenchData([FromQuery] int type)
    {
        var random = new Random();
        var res = await _qywxService.UpdateUserWorkbenchDataAsync(
            random.Next(0, 10),
            random.Next(0, 5),type);

        return Ok(new { success = true, message = res });
    }
}